package v1

import (
	"gamers/pkg/errorcode"
	"gamers/pkg/resp"
	"gamers/services"
	"github.com/gin-gonic/gin"
)

type NamespaceApi struct {
}

// GetNamespaceList: 获取kubernetes的命名空间列表校验
func (namespace *NamespaceApi) GetNamespaceList(ctx *gin.Context) {
	data, err := services.GetNamespaceListService()
	if err != nil {
		resp.ToErrorResponse(ctx, 500, err.(*errorcode.Error))
		return
	}
	resp.RespSuccess(ctx, data)
}
